SECNME := boot
TGTDIR := ../../build/
INCDIR := ../../include
SUBDIR := $(TGTDIR)$(SECNME)/
TARGET := $(TGTDIR)$(SECNME).o
SOURCE := $(wildcard *.c)
OBJS := $(patsubst %.c, $(SUBDIR)%.o, $(SOURCE))
CFLAGS += -I../../include

all: $(TARGET)

$(TARGET): $(OBJS)
	@echo LD $(TARGET)
	$(ECHOPRE)$(LD) -r -o $(TARGET) $(OBJS)

$(SUBDIR)%.o : %.c
	@echo CC $<
	$(ECHOPRE)$(CC) $(CFLAGS) -c -o $@ $<

.PHONY: clean

clean: 
	rm -rf $(TARGET) $(SUBDIR)
